import request from '@/api/request.js'


export default {
  //添加
  eEquipmentypeEditor(eEquipmentypeVO,eSensorVOList,eOptionVOList){
    return request({
      url:'/eEquipmentype/edit',
      method:'post',
      data:{
        eEquipmentypeVO,
        eSensorVOList,
        eOptionVOList,
      }
    })
  },

  // 编辑
  eEquipmentypeAdd(eEquipmentypeVO,eSensorVOList,eOptionVOList,equipmentId){
    return request({
      url:'/eEquipmentype/edit',
      method:'post',
      data:{
        eEquipmentypeVO,
        eSensorVOList,
        eOptionVOList,
        oldeEuipmentId:equipmentId
      }
    })
  },

  // 设备类型
  eEquipmentypeList(form){
    return request({
      url:'/eEquipmentype/query/'+form.currentPage+'/'+form.pageSize,
      method:'post',
      data:{
      }
    })
  },


  // 设备类型删除
  eEquipmentypeDelete(equipmentId){
    return request({
      url:'/eEquipmentype/delete',
      method:'post',
      data:{
        equipmentId
      }
    })
  },


  // 设备操作键
  eEquipmentOperats(form,equipmentId){
    return request({
      url:'/eOption/query/'+form.currentPage+'/'+form.pageSize,
      method:'post',
      data:{
        equipmentId
      }
    })
  },

  // 设备操作键删除
  eEquipmentOperatsDelete(equipmentId,operId){
    return request({
      url:'/eOption/delete',
      method:'post',
      data:{
        equipmentId,
        operId
      }
    })
  },


  // 设备操作键更新
  eEquipmentOperatsUpdate(equipmentId,operId,operScript){
    return request({
      url:'/eOption/update',
      method:'post',
      data:{
        equipmentId,
        operId,
        operScript
      }
    })
  },



  // 传感器list
  eEquipmentSensorList(form,equipmentId){
    return request({
      url:'/eSensor/query/'+form.currentPage+'/'+form.pageSize,
      method:'post',
      data:{
        equipmentId
      }
    })
  },


  // 通过equipmentId获取 操作  传感器
  getSensorByEquipId(equipmentId){
    return request({
      url:'/eSensor/query/',
      method:'post',
      data:{
        equipmentId
      }
    })
  },

  geteOptionByEquipId(equipmentId){
    return request({
      url:'/eOption/query/',
      method:'post',
      data:{
        equipmentId
      }
    })
  },


  // 获取温度data
  getTemporData(equipmentId){
    return request({
      url:'/eSensor/query',
      method:'post',
      data:{
        equipmentId
      }
    })
  },


  // 获取温度data
  getEquipInfoById(equipmentId){
    return request({
      url:'/eEquipmentype/query',
      method:'post',
      data:{
        equipmentId
      }
    })
  },

  // 获取操作键
  getEquipOption(equipmentId){
    return request({
      url:'/eOption/query/1/100',
      method:'post',
      data:{
        equipmentId
      }
    })
  },
  
  

}
